<?php

/**
 * @author kevin
 * @date 2016-01-16 14:00:00
 * @desc 新品、热销、口碑
 */

if (!defined('IN_ECS'))
{
    die('Hacking attempt');
}
$version = '1.0';   //版本号

if ($_POST['api_version'] != $version)      //网店的接口版本低
{
	api_err('0x008', 'a low version api');
}
//获取新品
/*if($_POST['st'] == 'new'){
	$data = get_recommend_goodsv1('new');
}*/
//获取口碑商品(精品)
/*if($_POST['st'] == 'best'){
	$data = get_recommend_goodsv1('best');
}*/
//热销商品(大家都在买)
if($_POST['st'] == 'hot'){
	$data = get_recommend_goodsv1('hot');
}
//本周特价商品
if($_POST['st'] == 'promote'){
	$data = get_promote_goodsv1('promote');
}
//st参数错误
if(!isset($data)){
	api_err('0x008');
}
//返回数据
data_back($data, '', RETURN_TYPE);